/*
 * Copyright (C) 2009 codemobiles.com.
 * http://www.codemobiles.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * author: Chaiyasit Tayabovorn 
 * email: chaiyasit.t@gmail.com
 */

package com.codemobiles.droidslator;

/**
 * This class is responsible for encapsulating information and object bound at a region
 * @author jaboho
 *
 */
public class RegionSpec {
  private String ID; // image identifier
  private int X = 0; // the x coordinate at the canvas
  private int Y = 0; // the y coordinate at the canvas
  private int beginX = 0; // the x coordinate start position at the canvas
  private int beginY = 0; // the y coordinate start position at the canvas 
  private int width = 0; // width of image
  private int height = 0; // height of image
  private Object boundObject; // object bound with this region

  
  public RegionSpec(int X, int Y, int beginX, int beginY, int width, int height){
    this.X = X;
    this.Y = Y;
    this.beginX = beginX;
    this.beginY = beginY;
    this.width = width;
    this.height = height;
  }
  
  public RegionSpec(int X, int Y, int width, int height){
    this.X = X;
    this.Y = Y;
    this.beginX = X;
    this.beginY = Y;
    this.width = width;
    this.height = height;
  }
  
  public boolean isCurrentBoundObject(Object obj){
    return obj.equals(boundObject);
  }

  
  public Object getBoundObject() {
    return boundObject;
  }
  public void setBoundObject(Object boundObject) {
    this.boundObject = boundObject;
  }
  public int getWidth() {
    return width;
  }
  public void setWidth(int width) {
    this.width = width;
  }
  public int getHeight() {
    return height;
  }
  public void setHeight(int height) {
    this.height = height;
  }
  public String getID() {
    return ID;
  }
  public void setID(String iamgeID) {
    this.ID = iamgeID;
  }
  public int getX() {
    return X;
  }
  public void setX(int x) {
    X = x;
  }
  public int getY() {
    return Y;
  }
  public void setY(int y) {
    Y = y;
  }
  public int getBeginX() {
    return beginX;
  }
  public void setBeginX(int beginX) {
    this.beginX = beginX;
  }
  public int getBeginY() {
    return beginY;
  }
  public void setBeginY(int beginY) {
    this.beginY = beginY;
  }
 
}
